<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> - 基本表单</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="../favicon.ico">
    <link href="/Public/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link rel="stylesheet" href="/Public/css/ace.min.css" />
    <link href="/Public/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/Public/css/animate.css" rel="stylesheet">
    <link href="/Public/css/style.css?v=4.1.0" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/Public/admin/css/gxxj/normalize.css">

    <style type="text/css">
        .m-search{
            display: flex;
            margin-left: 30px;
        }
        .outbound{
            display: inline-block;
            /*float: left;*/
            text-align: center;

        }
        .level{
            color: #2a2c2e;
        }
        .p_level{
            margin: 5px;
        }
        .leder{
            margin-left: 2em;
        }

    </style>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>用户信息-
                        <small>用户列表</small>
                    </h5>
                    <div class="ibox-tools">
                        <form method="get" action="<{$SRVER_NAME}>/admin.php/InOutbound/IFK_UserList"  style="display: flex;   margin-right: 30px;" class="pull-right mail-search">
                            <div class="m-search" style="display: flex">
                                <input type="hidden" name="rid" value="<{$rid}>">
                                <input type="hidden" name="type" value="<{$url_type}>">
                                <input  class="form-control input-sm" type="text" name="user" placeholder="搜索用户" value="<{$user_content}>"/>
                                <div class="input-group-btn">
                                    <button type="submit" class="btn btn-sm btn-primary">
                                        搜索
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <div class="clients-list">


                <div class="ibox-content">

                    <ul class="nav nav-tabs">
                        <li id="record_0"><a href="<{$SRVER_NAME}>/admin.php/InOutbound/IFK_UserList?page_first=<{$page_first}>&type=<{$url_type}>&type_status=0">全部</a></li>
                        <li id="record_1"><a href="<{$SRVER_NAME}>/admin.php/InOutbound/IFK_UserList?page_first=<{$page_first}>&type=<{$url_type}>&type_status=1">未沟通</a></li>
                        <li id="record_2"><a href="<{$SRVER_NAME}>/admin.php/InOutbound/IFK_UserList?page_first=<{$page_first}>&type=<{$url_type}>&type_status=2">已沟通</a></li>
                        <if condition="($url_type eq 2) OR ($url_type eq 4)">
                            <li id="record_4"><a href="<{$SRVER_NAME}>/admin.php/InOutbound/IFK_UserList?page_first=<{$page_first}>&type=<{$url_type}>&type_status=4">已认证人数</a></li>

                        </if>
                        <li id="record_3"><a href="<{$SRVER_NAME}>/admin.php/InOutbound/IFK_UserList?page_first=<{$page_first}>&type=<{$url_type}>&type_status=3">已经解决</a></li>

                    </ul>

                    <div class="tab-content" style="height: 800px" id="index_cont">
                        <div  class="tab-pane active">
                            <div class="full-height-scroll">
                                <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover" id="sample-table">
                        <thead>
                        <tr>
                            <th>用户名</th>
                            <th>手机号</th>
                            <th>手机型号</th>
                            <th>性别</th>
                            <th>用户认证</th>
                            <th>呼叫等级</th>
                            <!--<th>用户额度</th>-->
                            <!--<th>最近借款时间</th>-->
                            <th>注册时间</th>
                            <th>最近备注</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <volist name="user" id="vo" >
                            <tr id="tr_<{$vo.vid}>">
                                <td><{$vo.truename}></td>
                                <td><{$vo.mobile}></td>
                                <td><{$vo.mobilefirm}></td>
                                <td><{$vo.sex}></td>
                                <!--<td><{$vo.verify_num}></td>-->
                                <td><a onclick="show_verify('<{$vo.vid}>')">查看认证</a></td>
                                <td><{$vo.call_user_level}></td>
                                <!--<td><{$vo.quota}></td>-->
                                <!--<td style="width: 140px"><{$vo.borrow_time}></td>-->
                                <td style="width: 140px"><{$vo.ctime}></td>
                                <td style="width: 245px"><{$vo.feedback_content}></td>

                                <td style="width: 350px">

                                        <div class="outbound">
                                            <a href="javascript:;" onclick="Quick_answer(this,'<{$vo.vid}>')" class="btn btn-success btn-rounded" style="background-color: #6254B2">快速回复 </a>
                                            <!--<textarea rows="3" style="width: 200px" class="input_bg_color msg_content" name="content"  placeholder="请输入沟通结果"></textarea>-->
                                            <a href="javascript:;" onclick="Remarks(this,'<{$vo.vid}>')" class="btn btn-success btn-rounded" style="background-color: #4B87D9">备注 </a>
                                            <a href="<{$SRVER_NAME}>/admin.php/InOutbound/list_details?vid=<{$vo.vid}>&page=<{$page}>&url_type=<{$url_type}>&type_status=<{$url_type_status}>" class="btn btn-success btn-rounded">查看详情</a>
                                        </div>

                                </td>
                            </tr>
                        </volist>

                        </tbody>
                    </table>
                    <div class="dataTables_paginate paging_simple_numbers" >
                        <ul class="pagination">
                            <if condition="$tol gt 10">
                                <{$fpage}>
                            </if>
                        </ul>
                    </div>
                </div>
                </div>


                            <if condition="$url_type eq 3">

                            <span>外呼用户优先等级：</span>
                            <p class="p_level">一、认证通过时间在10.1号—10.22号的用户:   </p>
                            <p class="p_level leder"> <span class="level">A+</span>:在认证通过后和近期均有登录APP情况，且同盾近7天申请平台数在[5，15],在借贷平台有正常的活动，且部分有淘宝认证；   </p>
                            <p class="p_level leder">   <span class="level">A-</span>:在认证通过后和近期均有登录APP情况，且同盾近7天申请平台数在>15个,在借贷平台有异常频繁的活动； </p>
                            <p class="p_level leder">     <span class="level"> B+</span>：在近期有少数登录APP情况，且同盾近7天申请平台数在[5，15]个,在借贷平台有正常的活动，且部分有设置支付密码行为； </p>
                            <p class="p_level leder">     <span class="level"> B-</span>: 在认证通过后和近期均无登录APP情况，且同盾近7天申请平台数在[5，15]个,在借贷平台有正常的活动； </p>

                            <p class="p_level">二、认证通过时间在10月份之前的用户; </p>
                            <!--<p class="p_level leder">    <span class="level"> C-</span>: 认证通过后7天或15天有登录APP情况，且同盾近7天申请平台数>15个，在借贷平台有异常频繁的活动;</p>       -->
                            <p class="p_level leder">    <span class="level">  C+</span>: 在认证通过后或近期均有登录APP情况，且同盾近近7天申请平台数在[5，15]个，在借贷平台有正常的活动;</p>
                            <p class="p_level leder">    <span class="level">  C-</span>: 认证通过后7天或15天有登录APP情况，且同盾近7天申请平台数>15个，在借贷平台有异常频繁的活动;</p>
                            <p class="p_level leder">    <span class="level">D+</span>: 在认证通过后和近1个月均无登录APP情况，且同盾近7天申请平台数在[5，15]个，在借贷平台有正常的活动; </p>
                            <p class="p_level leder">   <span class="level"> D-</span>: 在认证通过后和近1个月均无登录APP情况，且同盾近7天申请平台数>15个，在借贷平台有异常频繁的活动; </p>
                            </if>

                            <if condition="($url_type eq 4) OR ($url_type eq 2) ">

                            <span>未认证用户外呼优先等级说明：</span>


                            <p class="p_level leder"> <span class="level">A：</span>用户后期有登录APP活动，且同盾近1个月申请平台数>10次，在借贷平台有频繁的活动</p>
                            <p class="p_level leder">   <span class="level">B:</span>:用户手机号码归属地在逾期率较低的地区及渠道属于逾期率较低的渠道来源，且同盾近1个月申请平台数>10次，在借贷平台有频繁的活动 </p>
                            <p class="p_level leder">     <span class="level">  C:</span>用户手机型号为逾期率较低的手机型号及注册时间在逾期率较低的注册时间段，且同盾近1个月申请平台数>10次，在借贷平台有频繁的活动</p>
                            <p class="p_level leder">     <span class="level"> D: </span>用户手机号码归属地在逾期率较低的地区和及注册时间在逾期率较低的注册时间段，且同盾近1个月申请平台数>10次，在借贷平台有频繁的活动</p>
                            <p class="p_level leder">     <span class="level"> E: </span>用户在后期无登录APP活动，且同盾近1个月申请平台数<10次，在借贷平台有较少的活动；</p>
                            </if>
                            <!--<p style="margin-top: 15px"><a onclick="show_anti_fraud_view()" style="font-size: medium;text-decoration: underline">反欺诈话术规范</a></p>-->
                </div>

                </div>
                </div>
            </div>
            </div>
        </div>
    </div>
</div>

<script src="/Public/js/jquery.min.js?v=2.1.4"></script>
<script src="/Public/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/Public/js/content.js?v=1.0.0"></script>
<script src="/Public/admin/js/layer/layer.js"></script>
<script src="/Public/admin/js/layui/layui.js"></script>


<script type="text/javascript">
    //显示反欺诈规范页面
    function show_anti_fraud_view() {

        layer.open({
            title:'反欺诈话术规范',
            type: 2,
            area: ['70%', '70%'],
            maxmin: true,
            offset:'100px',
            content: '<{$SRVER_NAME}>/admin.php/InOutbound/anti_fraud_view.html',
            success: function(layero){
                layero.find('.layui-layer-min').remove();
            }
        });


    }
    $(function () {
        var type="<{$url_type_status}>";
        if(type==1){
            $("#record_1").addClass('active');
        }else    if(type==2){
            $("#record_2").addClass('active');
        }else   if(type==3){
            $("#record_3").addClass('active');
        }else   if(type==0) {
            $("#record_0").addClass('active');
        }else   if(type==4) {
            $("#record_4").addClass('active');
        }
    });

    //查看认证弹框
    function show_verify(vid) {
//        alert(vid);

        layer.open({
            title:'认证信息',
            type: 2,
            area: ['20%', '35%'],
            maxmin: true,
            offset:'100px',
            content: '<{$SRVER_NAME}>/admin.php/InOutbound/show_verify.html?vid='+vid,
            success: function(layero){
                layero.find('.layui-layer-min').remove();
            }
        });
    }
    //备注
    function Remarks(obj,vid){

//        var page_first="<{$page_first}>";
        var type1="<{$url_type}>";
//        var page="<{$page}>";
//
        layer.open({
            title:'外呼沟通备注',
            type: 2,
            area: ['30%', '50%'],
            maxmin: true,
            offset:'100px',
            content: '<{$SRVER_NAME}>/admin.php/InOutbound/Remarks.html?vid='+vid+'&url_type='+type1,
            success: function(layero){
                layero.find('.layui-layer-min').remove();
            }
        });
    }
    //快速回复
    function Quick_answer(obj,vid){

//        var page_first="<{$page_first}>";
        var type1="<{$url_type}>";
//        var page="<{$page}>";
//
        layer.open({
            title:'外呼沟通快速回复',
            type: 2,
            area: ['30%', '50%'],
            maxmin: true,
            offset:'100px',
            content: '<{$SRVER_NAME}>/admin.php/InOutbound/Quick_answer.html?vid='+vid+'&url_type='+type1,
            success: function(layero){
                layero.find('.layui-layer-min').remove();
            }
        });
    }


    //回复记录
    function outbound_result(obj,vid) {
        var index = layer.load(1, {
            shade: [0.1, '#fff'] //0.1透明度的白色背景
        });
        var cur_index = $(obj).parents("tr").index();
        var page_first="<{$page_first}>";
        var type1="<{$url_type}>";
        var page="<{$page}>";
        var url= "<{$SRVER_NAME}>/admin.php/InOutbound/outbound_result";
        var to_url= "<{$SRVER_NAME}>/admin.php/InOutbound/IFK_UserList?page_first="+page_first+"&page="+page+"&type="+type1;
        var content = $("#sample-table").find(".msg_content").eq(cur_index).val();
        if(content=="" || content==null){
            layer.close(index);
            layer.alert("请信息填写完整！\r\n", {
                title: '提示框',
                icon: 0,
            });
            return false;
        }


        $.post(url, {vid: vid, content:content ,type1:type1}, function (data) {
            if (data.code == "1001") {
                layer.alert(data.result, {title: '提示框', icon: 1}, function () {
                    layer.close(index);
                    window.location.href =to_url;
                });
            }

            else {
                layer.alert(data.result, {title: '提示框', icon: 2});
                layer.close(index);
            }

        });
        layer.close(index);

    }

    function editUserInfo(id,name,card) {
        console.log("test"+name);
        if ($(".popUpBox").is(":hidden")) {
            $('#popCont')[0].reset(); //重置form表单
            $(".popUpBox").slideDown(500)
        } else {
            $(".popUpBox").slideUp(500)
        }
        $("#id_val").val(id);
        $("#name_show").val(name);
        $("#card_show").val(card);
    }

    function user_edit() {

        var index = layer.load(1, {
            shade: [0.1, '#fff'] //0.1透明度的白色背景
        });

        var id=$("#id_val").val();
        var name=$("#name_show").val();
        var card=$("#card_show").val();
        var url= "<{$SRVER_NAME}>/admin.php/UserInfo/user_edit";
        var tourl= "<{$SRVER_NAME}>/admin.php/UserInfo/user_list_info";

        if(name=="" || card==""){
            layer.close(index);
            layer.alert("请信息填写完整！\r\n", {
                title: '提示框',
                icon: 0,
            });
            return false;
        }

        layer.alert("确定修改？", {title: '提示框', icon: 1}, function () {

            $.post(url, {id: id, name:name,card:card}, function (data) {
                if (data.code == "1001") {
                    layer.alert(data.result, {title: '提示框', icon: 1}, function () {
                        window.location.href =  "";
                        layer.close(index);
                    });
                }
                else {
                    layer.alert(data.result, {title: '提示框', icon: 2});
                    layer.close(index);
                }

            });
            layer.close(index);
        });
    }


</script>

</body>
</html>
